%% Author: John
%% Created: 2010-7-11
%% Description: TODO: Add description to ets_test
-module(ets_test).
%%
%% Include files
%%

%%
%% Exported Functions
%%
-export([start/0]).

%%
%% API Functions
%% ets_test:start().
%%
start()->
	lists:foreach(fun test_ets/1, [set,ordered_set,bag,duplicate_bag]).


%%
%% Local Functions
%%
test_ets(Mode)->
	TableId=ets:new(test, [Mode]),
	ets:insert(TableId, {a,1}),
	ets:insert(TableId, {b,2}),
	ets:insert(TableId, {a,1}),
	ets:insert(TableId, {a,3}),
	List = ets:tab2list(TableId),
	io:format("~-13w => ~p~n", [Mode,List]),
	ets:delete(TableId).
